<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>管理中心 - 商品列表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/Public/Admin/Styles/general.css" rel="stylesheet" type="text/css" />
    <link href="/Public/Admin/Styles/main.css" rel="stylesheet" type="text/css" />
    <link href="/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/Public/bootstrap/css/docs.min.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/Public/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<h1>
    <?php if($_page_btn_name): ?>
    <span class="action-span"><a href="<?php echo $_page_btn_link; ?>"><?php echo $_page_btn_name; ?></a></span>
    <?php endif; ?>
<span class="action-span1"><a href="<?php echo U('');?>">管理中心</a></span>
<span id="search_id" class="action-span1"> - <?php echo $_page_title; ?> </span>
<div style="clear:both"></div>
</h1>
<div class="list-div" id="listDiv">
<table>
    <thead>
    <tr>
        <th>订单号</th>
        <th>下单时间</th>
        <th>收货人</th>
        <th>总金额</th>
        <th>快递单号</th>
        <th>订单状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <?php foreach($data as $k=>$v):?>
    <tr>
        <td><?php echo ($v["order_sn"]); ?></td>
        <td><?php echo date('Y-m-d H:i:s' , $v['addtime'])?></td>
        <td>
            <p><?php echo ($v["shr_name"]); ?>[TEL:<?php echo ($v["shr_tel"]); ?>]</p>
            <p><?php echo ($v["shr_province"]); echo ($v["shr_city"]); echo ($v["shr_area"]); echo ($v["address"]); ?></p>
        </td>
        <td>￥<?php echo ($v["total_price"]); ?></td>
        <td><?php if($v['post_number']): echo ($v["post_number"]); else:?>无<?php endif;?></td>
        <td>
            <?php if($v['order_status']=='正常'):?>
               <?php if($v['pay_status']=='是'):?>
                已付款 - <?php echo $v['post_status'] == 0 ? '未发货':($v['post_status'] ==1?'已发货':'已签收'); ?>
            <?php else:?>
            未付款
            <?php endif;?>
            <?php else:?>
            已关闭
            <?php endif;?>
        </td>
        <td><a class="btn btn-xs btn-primary" href="<?php echo U('edit',array('order_id' =>$v['id'],'p'=>I('get.p')));?>" title="查看">查看</a>
            <?php if($v['order_status']=='关闭'):?></td>
        <a class="btn btn-xs btn-danger" href="<?php echo U('delete',array('id'=>$v['id'],'p'=>I('get.p')))?>" onclick="return confirm('确定要删除吗')">删除订单</a></td>
        <?php endif;?>
    </tr>
    <?php endforeach;?>
    </tbody>
</table>
    </div>
<div id="footer">
    共执行 9 个查询，用时 0.025161 秒，Gzip 已禁用，内存占用 3.258 MB<br />
    版权所有 &copy; 2005-2012 上海商派网络科技有限公司，并保留所有权利。
</div>
</body>
</html>